home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Testers
/
Solar Tester (With Tunings)
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
2KB
|
92 lines
;;; Solar Song Example
(def-solar sun
(dates ; rotation speed
(mercurius 0 59 0 0 0)
(venus 0 244.3 0 0 0)
(earth 0 0 23 56 4.1)
(mars 0 0 24 37 22.6)
(jupiter 0 0 9 50 0)
(saturnus 0 0 10 40 0)
(uranus 0 0 12 0 0)
(neptunus 0 0 15 48 0)
(pluto 0 0 6 9 17))
(cycles ; now define year length
(mercurius 0 87.96 0 0 0)
(venus 0 224.68 0 0 0)
(earth 1 0 0 0 0)
(mars 0 686.95 0 0 0)
(jupiter 11.862 0 0 0 0)
(saturnus 29.456 0 0 0 0)
(uranus 84.07 0 0 0 0)
(neptunus 164.81 0 0 0 0)
(pluto 248.53 0 0 0 0))
(location ; and relative location to sun
(mercurius 1 0 0 0 0) ; note that you can express any
(venus 2 0 0 0 0) ; values here using just a one
(earth 3 0 0 0 0) ; parameter and set others as zero
(mars 4 0 0 0 0)
(jupiter 5 0 0 0 0)
(saturnus 6 0 0 0 0)
(uranus 7 0 0 0 0)
(neptunus 8 0 0 0 0)
(pluto 9 0 0 0 0)))
(setq waveform
(gen-fourier
(gen-solar sun cycles jupiter
mercurius venus earth mars jupiter saturnus uranus neptunus)
(reverse
(gen-solar sun location jupiter
mercurius venus earth mars jupiter saturnus uranus neptunus))
'(0 0 0 0 0 0 0 0 0)
512))
(def-instrument-symbol
piano (filter-delete '(=) (find-change (vector-to-symbol a e waveform)))
)
(def-instrument-velocity
piano (vector-round 40 127 waveform)
)
(create-tonality al-far
'(1/1 9/8 27/20 729/512 3/2 9/5 19/10))
(create-tonality al-farabi
'(1/1 16/15 8/7 4/3 3/2 8/5 12/7))
(create-tonality byzantine
'(1/1 18/17 9/7 4/3 3/2 18/11 9/5))
(create-tonality dudon-b
'(1/1 13/12 59/48 4/3 3/2 13/8 59/32))
(create-tonality hhosaini
'(1/1 65536/59049 32/27 4/3 262144/177147 27/16 16/9))
(create-tonality ionic
'(1/1 9/8 5/4 4/3 3/2 5/3 9/5))
(create-tonality Joyous6
'(1/1 9/8 5/4 3/2 5/3 15/8))
(create-tonality harm15
'(1/1 17/16 18/16 19/16 20/16 21/16 22/16 23/16 24/16 25/16 26/16
27/16 28/16 29/16 30/16 31/16))
(def-instrument-tonality
piano (activate-tonality (harm15 c 4 4020))
)
(def-instrument-length
piano (get-timing '1/16 (find-change (vector-to-symbol a e waveform)))
)
(def-instrument-zone
piano (* 512 (get-tick '1/16))
)
(compile-instrument-p "ccl;output:" "Solar Song"
piano
)